package com.ux.manager
{
	import flash.display.DisplayObject;
	import flash.display.Sprite;
	
	import nexus.base.NXSprite;
	
	public class PopUpManager extends PopUpManagerBase
	{
		public function PopUpManager( se:SingletonEnforcer )
		{
			super();
			if ( _instance != null ) throw new Error( this+' Singleton Error' );
			_instance = this;
		}
		
		/*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
		| private variables
		|-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
		
		private static var _instance:PopUpManager;
		
		/*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
		| children
		|-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
		
		/*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
		| public variables
		|-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/	
		
		
		/*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
		| getter & setter
		|-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
		
		/*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
		| public function
		|-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
		
		public static function getInstance():PopUpManager{
			if ( _instance == null ) 
				_instance = new PopUpManager( new SingletonEnforcer() );              
			return _instance;
		}
		
		override public function centerPopUp( popup:DisplayObject, target:DisplayObject=null ):void{
			super.centerPopUp( popup, target );
		}
		
		/*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
		| protected function
		|-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
		
		override protected function createCover():NXSprite{
			var cover:NXSprite = new NXSprite();
			cover.borderBottomThickness = 0;
			cover.borderLeftThickness = 0;
			cover.borderRightThickness = 0;
			cover.borderTopColor = 0;
			
			cover.backGroundColor = 0xffffff;
			cover.backGroundAlpha = 0.3;
			return cover;
		}
		
		/*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
		| event handler
		|-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
		
		/*-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
		| private function
		|-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
		
	}
}
class SingletonEnforcer{}